package lab02.test30;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * Created by 星月 on 2017/11/20.
 */
public class Test {
    //从键盘读取一个考试分数列表，计算它们的平均分。
    public static void main(String[] args) {
        double average=0;
        double sum=0;
        Scanner student=new Scanner(System.in);
        System.out.println("请输入成绩：");
        double[] numbers = new double[5];
        Scanner reader = new Scanner(System.in);
        for(int i=0;i<numbers.length;i++){
            numbers[i]=reader.nextInt();
            sum+=numbers[i];
        }
        average=sum/numbers.length;
        System.out.println(numbers.length+"名学生成绩的平均分： "+average);
    }
}
